home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 1 #2 / Commodore_Disk_User_Vol.1_2_1988_-.d64 / character editor (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  4KB  |  125 lines

  1. 10 rem noluxe character editer
  2. 20 rem ludo decock
  3. 30 rem lindenstraat 26
  4. 40 rem 8840 gits
  5. 50 rem belgium
  6. 60 dimte$(36):l=48:z=1144:gosub1200:le=1
  7. 70 poke53280,0:poke53281,0:sys58692:poke646,5:printchr$(142)chr$(9):poke53269,0
  8. 80 print"   [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
  9. 90 print"    noluxe character editor "
  10. 100 print"    by flossoftware (c)1987 "
  11. 110 input"load character set y/n (e=end) ";jn$
  12. 120 ifjn$="y"then1080
  13. 130 ifjn$="e"thenprintchr$(147)chr$(8):end
  14. 140 print"how big are the characters (x*y < 256) ?"
  15. 150 poke19,1:input"- x-value (< 21) :";b:poke19,0:print
  16. 160 poke19,1:input"- y-value (< 30) :";h:poke19,0:print
  17. 170 ifb*h>255orb>29orh>20then70
  18. 180 rem screen---------------------------
  19. 190 print"[147]";:fory=0toh-1:forx=(1144+(y*40))to(1144+b+(y*40))-1
  20. 200 pokex+54272,6:pokex,207:nextx,y
  21. 210 print"[129]     [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
  22. 220 print"      noluxe character editor "
  23. 230 print"     [152] by flossoftware (c)1987 "
  24. 240 r=4:k=30:gosub400:print"[158] f1 [146] [153]mode"
  25. 250 r=6:k=30:gosub400:print"[158] f2 [146] [153]save"
  26. 260 r=8:k=30:gosub400:print"[158] f4 [146] [153]show"
  27. 270 r=10:k=30:gosub400:print"[158] f6 [146] [153]disk"
  28. 280 r=12:k=30:gosub400:print"[158] f8 [146] [153]run"
  29. 290 r=14:k=30:gosub400:print"[158] -  [146]"
  30. 300 r=15:k=35:gosub400:print"[153]page"
  31. 310 r=16:k=30:gosub400:print"[158] +  [146]"
  32. 320 r=17:k=37:gosub400:print"[153][169][223]"
  33. 330 r=18:k=30:gosub400:print"[158]crsr [146] [153][169][146][186][204][223]"
  34. 340 r=19:k=36:gosub400:print"[223][208][207][169]"
  35. 350 r=20:k=37:gosub400:print"[223][169]"
  36. 360 r=22:k=30:gosub400:print"[156]chr$"
  37. 370 r=22:k=34:gosub400:print"[150]";l
  38. 380 r=24:k=33:gosub400:print"[154]";chr$(l);"":poke53269,1
  39. 390 goto420
  40. 400 poke214,r:poke211,k:sys58640:return
  41. 410 rem button ? ------------------------
  42. 420 geta$:ifa$=""then420
  43. 430 a=asc(a$)
  44. 440 rem cursor move ---------------------
  45. 450 ifa<>17anda<>29anda<>145anda<>157then580
  46. 460 ifa<>145then490
  47. 470 ifpeek(53249)=74then420
  48. 480 gosub1160:poke53249,peek(53249)-8:pv=pv-40:goto420
  49. 490 ifa<>17then520
  50. 500 ifpeek(53249)=74+((h-1)*8)then420
  51. 510 gosub1160:poke53249,peek(53249)+8:pv=pv+40:goto420
  52. 520 ifa<>157then550
  53. 530 ifpeek(53248)=24then420
  54. 540 gosub1160:poke53248,peek(53248)-8:pv=pv-1:goto420
  55. 550 ifpeek(53248)=24+((b-1)*8)then420
  56. 560 gosub1160:poke53248,peek(53248)+8:pv=pv+1:goto420
  57. 570 rem mode ----------------------------
  58. 580 ifa<>133then630
  59. 590 ifpk=0thenpk=11:poke53280,pk:goto420
  60. 600 ifpk=11thenpk=15:poke53280,pk:goto420
  61. 610 ifpk=15thenpk=0:poke53280,pk:goto420
  62. 620 rem next character ------------------
  63. 630 ifa<>43then680
  64. 640 ifl=90then420
  65. 650 ifl=57thenl=65:le=le+1:goto370
  66. 660 l=l+1:le=le+1:goto370
  67. 670 rem previous character --------------
  68. 680 ifa<>45then730
  69. 690 ifl=48then420
  70. 700 ifl=65thenl=57:le=le-1:goto370
  71. 710 l=l-1:le=le-1:goto370
  72. 720 rem character in memory -------------
  73. 730 ifa<>137then810
  74. 740 te$(le)="":poke53280,2:poke53269,0:fors=ztoz+b:so=0
  75. 750 forss=stos+(h*40)step40:so=peek(ss)+so:nextss
  76. 760 ifso=207*h+32thennexts:pk=0:so=0:poke53269,1:goto420
  77. 770 forss=stos+(h*40)step40:so=peek(ss):ifso=160thente$(le)=te$(le)+"1":nextss
  78. 780 ifso=207thente$(le)=te$(le)+"0":nextss
  79. 790 nexts:poke53280,0:poke53269,1:pk=0:so=0:goto420
  80. 800 rem character to screen -------------
  81. 810 ifa<>138then920
  82. 820 poke53280,4:poke53269,0:u=0:q=0
  83. 830 fory=0toh-1:forx=(1144+(y*40))to(1144+b+(y*40))-1:pokex+54272,6:pokex,207:nextx,y
  84. 840 ifte$(le)=""then900
  85. 850 fors=1tolen(te$(le)):u=u+1:ifu>hthenu=1:q=q+1
  86. 860 ss=z+q+((u-1)*40)
  87. 870 ifmid$(te$(le),s,1)="1"thenpokess,160:pokess+54272,5:goto890
  88. 880 ifmid$(te$(le),s,1)="0"thenpokess,207
  89. 890 nexts
  90. 900 poke53280,0:poke53269,1:pk=0:q=0:u=0:goto420
  91. 910 rem new start -----------------------
  92. 920 ifa<>140then980
  93. 930 k=0:r=24:gosub400:print"r[146]un/g[146]o on"
  94. 940 getke$:ifke$<>"r"andke$<>"g"then940
  95. 950 ifke$="g"thenk=0:r=24:gosub400:print"           ":goto420
  96. 960 run
  97. 970 rem save to disk --------------------
  98. 980 ifa<>139then1140
  99. 990 k=0:r=24:gosub400:print"s[146]ave/g[146]o on"
  100. 1000 getke$:ifke$<>"s"andke$<>"g"then1000
  101. 1010 ifke$="g"thenk=0:r=24:gosub400:print"           ":goto420
  102. 1020 poke53269,0
  103. 1030 print"[147][152]save":poke19,1:input"filename: ";fi$:iflen(fi$)>13thenprint:goto1030
  104. 1040 fi$="k."+left$(fi$,len(fi$)):poke19,0:open2,8,2,fi$+",s,w"
  105. 1050 print#2,b:print#2,h:forf=1to36:ifte$(f)=""thente$(f)="2"
  106. 1060 print#2,len(te$(f)):print#2,te$(f):nextf:close2:goto190
  107. 1070 rem load from disk -----------------
  108. 1080 print"[147][152]load":poke19,1:input"filename : ";fi$:iflen(fi$)>13thenprint:goto1080
  109. 1090 fi$="k."+left$(fi$,len(fi$)):poke19,0:open15,8,15:open2,8,2,fi$+",s,r"
  110. 1100 input#15,en:ifen>19thenclose2:close15:goto1080
  111. 1110 input#2,b:input#2,h:forf=1to36:te$(f)="":input#2,le
  112. 1120 fori=1tole:get#2,x$:te$(f)=te$(f)+x$:nexti:get#2,x$:nextf:close2:close15
  113. 1130 l=48:le=1:goto190
  114. 1140 goto420
  115. 1150 rem poke color & character ---------
  116. 1160 ifpk=11thenpokepv+1144,160:pokepv+55416,5
  117. 1170 ifpk=15thenpokepv+1144,207:pokepv+55416,6
  118. 1180 return
  119. 1190 rem sprite -------------------------
  120. 1200 poke2040,15:fori=0to62:readq:poke960+i,q:nexti
  121. 1210 poke53248,24:poke53249,74:poke53287,1
  122. 1220 data255,192,0,255,192,0,192,192,0,192,192,0,192,192,0,192,192,0,192,192,0
  123. 1230 data192,192,0,255,192,0,255,192,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  124. 1240 return
  125.